package com.sg.service.biz.pbff.nb;

import com.sg.common.baseinfo.BaseInfoDO;
import com.sg.common.baseinfo.BaseInfoHolder;
import com.sg.common.util.CommonFunctionHelper;
import com.sg.dto.biz.pbff.req.PutAppPublicFieldCacheComReqDto;
import com.sg.dto.biz.pbff.res.PutAppPublicFieldCacheComRespDto;
import org.apache.skywalking.apm.toolkit.trace.Tag;
import org.apache.skywalking.apm.toolkit.trace.Tags;
import org.apache.skywalking.apm.toolkit.trace.Trace;
import org.springframework.stereotype.Service;

/**
 * @author ： 手工接入方法
 * @version 1.0
 * @since 2022/5/28 15:32
 */
@Service
public class NbSystemTestDomain {

    /**
     * code:publicFieldCache
     * name:D3-推送业务应用公共字段缓存测试(公共)
     * desc:undefined
     * gen by moon at 9/9/2022, 6:31:13 PM
     **/
    @Trace(operationName = "D3-推送业务应用公共字段缓存测试(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public PutAppPublicFieldCacheComRespDto putAppPublicFieldCacheCom(PutAppPublicFieldCacheComReqDto reqDto) {
        if (BaseInfoHolder.contextHolder.get() != null) {
            BaseInfoHolder.contextHolder.remove();
        }
        BaseInfoDO domain = new BaseInfoDO();
        domain.setSpecSpaceId(reqDto.getSpaceId());
        domain.setSpecInductionRecordId(reqDto.getCreateInductionId());
        domain.setSpecAppId(reqDto.getAppId());
        CommonFunctionHelper.setBaseInfoToLocal(domain);
        return new PutAppPublicFieldCacheComRespDto();
    }
    //手工接入方法
}
